import httpServe from '@/global-services/index';
type _tsObj = Record<string, any>;

const proxyCode = '/base';
export const realVideoApi = {
	/** 监控中心 **/
	tree: () => httpServe.getHttp(`${proxyCode}/mirgic/box/monitor/getDeviceList`)(), // 树
	saveRemember: (data: _tsObj) => httpServe.postHttp(`${proxyCode}/mirgic/box/monitor/savePageInfo`)(data), // 记忆
	getRemember: () => httpServe.getHttp(`${proxyCode}/mirgic/box/monitor/getPageInfo`)(), // 获取记忆
	getAlarmList: (data: _tsObj) => httpServe.getTableHttp(`${proxyCode}/mAlgorithmAlarm/page`)(data), // 获取报警记录列表
	getVideoList: () => httpServe.getHttp(`${proxyCode}/mirgic/box/monitor/getVideoList`)(), // 获取直播播放列表
	getInspection: () => httpServe.getHttp(`${proxyCode}/inspection/getInfo`)(), // 获取智能巡检信息
	saveInspection: (data: _tsObj) => httpServe.postHttp(`${proxyCode}/inspection/saveInfo`)(data), // 保存智能巡检信息
	startInspection: () => httpServe.getHttp(`${proxyCode}/inspection/startInspection`)(), // 开启智能巡检
	fail: (data: _tsObj) => httpServe.postHttp(`${proxyCode}/inspection/play/fail`)(data), // 保存智能巡检信息

	getPlay: (data: _tsObj) => httpServe.postHttp(`${proxyCode}/mirgic/box/monitor/get/play/videoAddress`)(data), // 摄像头推流
	getClose: (data: number[]) => httpServe.postHttp(`${proxyCode}/mirgic/box/monitor/close/video`)(data), // 摄像头关流
	getCheck: (data: _tsObj) => httpServe.postHttp(`${proxyCode}/mirgic/box/monitor/check/video`)(data), // 续约摄像头
	// 播放列表实例
	/** 综合态势 **/
	getMemoryComper: () => httpServe.getHttp(`${proxyCode}/memory-comper`)(), // 记忆报警类型
	postMemoryComper: (data: _tsObj) => httpServe.postHttp(`${proxyCode}/memory-comper`)(data), // 修改记忆报警类型
	getComprehensive: () => httpServe.getHttp(`${proxyCode}/comprehensive/situation/getComprehensive`)(), // 综合信息
	analysis: (data: _tsObj) => httpServe.getHttp(`${proxyCode}/comprehensive/situation/getAlarm/analysis`)(data), // 报警分析
	trend: (data: _tsObj) => httpServe.getHttp(`${proxyCode}/comprehensive/situation/getAlarm/trend`)(data), // 报警趋势
	area: (data: _tsObj) => httpServe.getHttp(`${proxyCode}/comprehensive/situation/getAlarm/area`)(data) // 报警区域
};
